// Image Loader
// (c) jimon game studio

#ifndef JEH_IIMAGELOADER
#define JEH_IIMAGELOADER

#include "jeUnknown.h"
#include "IBuffer.h"
#include "IImage.h"
#include "jeSingleton.h"
#include "IFileSystem.h"
#include "IImageFormatLoader.h"

namespace je
{
	namespace video
	{
		//! Image Loader
		class IImageLoader:public je::jeUnknown
		{
		public:

			//! Destructor
			virtual ~IImageLoader()
			{
			}

			//! Load Image
			virtual IImage * LoadImage(core::IBuffer * DataBuffer) = 0;

			//! Save Image
			virtual void SaveImage(core::IBuffer * Buffer,IImage * Image,ImageFormat Format) = 0;

			//! Register Format Loader
			virtual void RegisterFormatLoader(IImageFormatLoader * FormatLoader) = 0;

			//! UnRegister Format Loader
			virtual void UnRegisterFormatLoader(IImageFormatLoader * FormatLoader) = 0;

			//! Get Format Loader
			virtual IImageFormatLoader * GetFormatLoader(ImageFormat Format) = 0;
		};

		DECLARE_SINGLETON_E(JE_ENGINE_FUNCTION_API,JE_ENGINE_FUNCTION_CALL,ImageLoader)
	}
}

#endif
